Transmission Control Protocol (“TCP”) is a connection-oriented, reliable delivery transport layer protocol. TCP is typically described as a transport layer that provides an interface between an application layer and a network layer. The application layer generally communicates with the TCP layer by sending or receiving a stream of data (e.g., a number of bytes of data). TCP organizes this datastream into segments that can be carried by the protocol employed at the network layer, e.g., the Internet Protocol (“IP”). These segments are commonly referred to as “packets,” “frames,” or “messages.” TCP and IP are often jointly referred to as TCP/IP. The application, transport, and network layers, together with other layers, are jointly referred to as a data communications stack.
Clients and servers communicate with one another using TCP by establishing a connection between one another. When establishing a connection, a server typically opens a “socket” and listens passively for a connection request from a client. The client requests to open a connection by sending a signal to the server's socket, which the server acknowledges to open the connection. Once a connection is established, the client and server can exchange messages.
TCP guarantees order and delivery of messages by adding or verifying sequence numbers in the messages. The sender of messages adds a sequence number to each message it sends. The receiver of the messages acknowledges delivery of the messages by returning the sequence number of the received messages in acknowledgment messages. When the sender does not receive in a timely manner an acknowledgement for a message it sent, the sender assumes that the message was lost and re-sends the message. In a variation of this method of guaranteeing order and delivery, a “sliding window” of messages may be used. When using a sliding window method, the sender may send multiple messages, each with a different sequence number, without waiting for an acknowledgement for each sent message before sending another message. The sender may then send additional messages after receiving an acknowledgment for one or more messages in the previously sent window, or may re-send messages for which an acknowledgment is not received in a timely manner. Thus, by sending, acknowledging, and verifying sequence numbers, TCP guarantees order and delivery of messages.
When a protocol of a layer of a data communications stack guarantees order and delivery of messages, higher levels of the data communications stack, such as an application or session layer, do not need to be concerned that data will be lost or may arrive in an unintended sequence. As an example, if a client application sends a message to a database server indicating to set a value to 5, then sends a message indicating to set the value to 10, and finally sends a message indicating to multiply the value by 3, the final result would be different depending on whether all messages arrived at the server, and whether they arrived in the intended order. An application using a TCP transport layer can be assured that the final result will be 30, but an application using an alternate transport layer may have no such assurance. Because TCP guarantees order and delivery of messages, it is commonly employed in intranets, the Internet, and other networks employing unreliable lower layers of a data communications stack.
Although TCP guarantees the order and delivery of messages, it does not guarantee the time of delivery. The timing of message delivery can be unpredictable because messages may travel over different network routes, the sender may attempt multiple retransmissions before receiving an acknowledgment, or because of other reasons beyond an application's (or transport layer's) control. As a result, the difference in time between two received messages may be substantially greater than the difference between the times the messages were sent.
These delays may create problems for some types of applications. As an example, client applications that receive audio (e.g., “Voice over IP” or streaming audio) or video (e.g., streaming video) from a server may need to receive messages containing the audio or video without significant delays between the messages. Otherwise, a listener or viewer may perceive gaps in the received audio or video information. When applications desire to minimize or eliminate such delays, they may use a transport protocol other than TCP. However, these other transport protocols may not guarantee order and delivery. Moreover, these other transport protocols may not be as commonly employed as TCP, and so messages sent using these transport protocols may not be capable of being distributed as widely as when sent using TCP.
A technique for using protocols that guarantees order and delivery, such as TCP, to deliver data to applications that have a low tolerance for delays would thus have significant utility.